package com.example.chinesenation.Service.Impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.chinesenation.Mapper.NationPartitionMapper;
import com.example.chinesenation.Entity.NationPartition;
import com.example.chinesenation.Service.INationPartitionService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author sakuraFallingDown
 * @since 2021-01-12
 */
@Service
public class NationPartitionServiceImpl extends ServiceImpl<NationPartitionMapper, NationPartition> implements INationPartitionService {
    @Override
    public List<NationPartition> findByPid(String pid) {
        QueryWrapper<NationPartition> qw=new QueryWrapper<>();
        qw.likeRight("pid",pid);
        qw.orderByDesc("total_number");
        return list(qw);
    }
}
